package com.bnzjy.srb.core.pojo.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
@ApiModel(description="注册对象")
public class RegisterVO {
    
    @ApiModelProperty(value = "用户类型")
    private Integer userType;
    
    @Length(min = 11, max = 11)
    @Pattern(regexp = "^((13[0-9])|(15[^4,\\D])|(17[0-9])|(18[0-9]))\\d{8}$", message = "手机格式有误")
    @ApiModelProperty(value = "手机号")
    private String mobile;

    @ApiModelProperty(value = "验证码")
    private String code;
    
//    @Length(min = 6, max = 24)
    @Pattern(regexp = "^(?![0-9] + $)(?![a-zA-Z] + $)[0-9A-Za-z]{6,24}$", message = "密码必须为6-24个字母和数字组合")
    @ApiModelProperty(value = "密码")
    private String password;
}
